package cn.lzy.scope;

import cn.lzy.scope.config.JavaConfig;
import cn.lzy.scope.entity.User;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description
 * @Author lzy
 * @Date 2023/11/27 16:26
 * @Version
 **/
public class JavaDemo {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(JavaConfig.class);
        User u1 = ctx.getBean(User.class);
        User u2 = ctx.getBean(User.class);
        System.out.println(u1 == u2);
    }
}
